/**
 * BigBend_icsEventGenerator
 *
 * @version 1.3
 * @author Daniel Kim, Patrick Tran, Zen Ushida, & Chris Uyeda
 */
package bigbend_icseventgenerator;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.util.Calendar;

public class BigBend_icsEventGenerator extends javax.swing.JFrame {

    //Variables declaration - do not modify//GEN-BEGIN:variables
    
    //String and calendar datastructures
    protected String name;
    protected String classification;
    protected String priority;
    protected String dtstart;
    protected String dtstart_year;
    protected String dtstart_month;
    protected String dtstart_day;
    protected String dtstart_hours;
    protected String dtstart_minutes;
    protected String dtstart_AMPM;
    protected String dtend;
    protected String dtend_year;
    protected String dtend_month;
    protected String dtend_day;
    protected String dtend_hours;
    protected String dtend_minutes;
    protected String dtend_AMPM;
    protected String location;
    protected String resources;
    protected String comments;
    protected Calendar dtstart_cal;
    protected Calendar dtend_cal;

    //UI Elements
    protected javax.swing.JLabel Title;
    protected datechooser.beans.DateChooserCombo dateChooserCombo_dtendDate;
    protected datechooser.beans.DateChooserCombo dateChooserCombo_dtstartDate;
    protected javax.swing.JButton jButton_generate;
    protected javax.swing.JButton jButton_reset;
    protected javax.swing.JComboBox jComboBox_classification;
    protected javax.swing.JComboBox jComboBox_dtendAMPM;
    protected javax.swing.JComboBox jComboBox_dtstartAMPM;
    protected javax.swing.JComboBox jComboBox_priority;
    protected javax.swing.JLabel jLabel_classification;
    protected javax.swing.JLabel jLabel_comments;
    protected javax.swing.JLabel jLabel_commentsError;
    protected javax.swing.JLabel jLabel_dtend;
    protected javax.swing.JLabel jLabel_dtendError;
    protected javax.swing.JLabel jLabel_dtstart;
    protected javax.swing.JLabel jLabel_dtstartError;
    protected javax.swing.JLabel jLabel_location;
    protected javax.swing.JLabel jLabel_locationError;
    protected javax.swing.JLabel jLabel_name;
    protected javax.swing.JLabel jLabel_nameError;
    protected javax.swing.JLabel jLabel_outputError;
    protected javax.swing.JLabel jLabel_priority;
    protected javax.swing.JLabel jLabel_resources;
    protected javax.swing.JLabel jLabel_resourcesError;
    protected javax.swing.JScrollPane jScrollPane;
    protected javax.swing.JScrollPane jScrollPane_output;
    protected javax.swing.JSpinner jSpinner_dtendHours;
    protected javax.swing.JSpinner jSpinner_dtendMinutes;
    protected javax.swing.JSpinner jSpinner_dtstartHours;
    protected javax.swing.JSpinner jSpinner_dtstartMinutes;
    protected javax.swing.JTextArea jTextArea_comments;
    protected javax.swing.JTextArea jTextArea_output;
    protected javax.swing.JTextField jTextField_location;
    protected javax.swing.JTextField jTextField_name;
    protected javax.swing.JTextField jTextField_resources;
    // End of variables declaration//GEN-END:variables

    /**
     * Creates new form BigBend_icsEventGenerator
     */
    public BigBend_icsEventGenerator() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     */
    @SuppressWarnings("unchecked")
	
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    protected void initComponents() {

        Title = new javax.swing.JLabel();
        jLabel_name = new javax.swing.JLabel();
        jLabel_nameError = new javax.swing.JLabel();
        jLabel_classification = new javax.swing.JLabel();
        jLabel_priority = new javax.swing.JLabel();
        jLabel_dtstart = new javax.swing.JLabel();
        jLabel_dtstartError = new javax.swing.JLabel();
        jLabel_dtend = new javax.swing.JLabel();
        jLabel_dtendError = new javax.swing.JLabel();
        jLabel_location = new javax.swing.JLabel();
        jLabel_locationError = new javax.swing.JLabel();
        jLabel_resources = new javax.swing.JLabel();
        jLabel_resourcesError = new javax.swing.JLabel();
        jLabel_comments = new javax.swing.JLabel();
        jLabel_commentsError = new javax.swing.JLabel();
        jLabel_outputError = new javax.swing.JLabel();
        jTextField_name = new javax.swing.JTextField();
        jComboBox_classification = new javax.swing.JComboBox();
        jComboBox_priority = new javax.swing.JComboBox();
        dateChooserCombo_dtstartDate = new datechooser.beans.DateChooserCombo();
        dateChooserCombo_dtendDate = new datechooser.beans.DateChooserCombo();
        jSpinner_dtstartHours = new javax.swing.JSpinner();
        jSpinner_dtstartMinutes = new javax.swing.JSpinner();
        jComboBox_dtstartAMPM = new javax.swing.JComboBox();
        jSpinner_dtendHours = new javax.swing.JSpinner();
        jSpinner_dtendMinutes = new javax.swing.JSpinner();
        jComboBox_dtendAMPM = new javax.swing.JComboBox();
        jTextField_location = new javax.swing.JTextField();
        jTextField_resources = new javax.swing.JTextField();
        jScrollPane = new javax.swing.JScrollPane();
        jTextArea_comments = new javax.swing.JTextArea();
        jButton_reset = new javax.swing.JButton();
        jButton_generate = new javax.swing.JButton();
        jScrollPane_output = new javax.swing.JScrollPane();
        jTextArea_output = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setFocusCycleRoot(false);

        Title.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bigbend_icseventgenerator/title.png"))); // NOI18N

        jLabel_name.setText("Name");

        jLabel_nameError.setForeground(new java.awt.Color(153, 153, 153));
        jLabel_nameError.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);

        jLabel_classification.setText("Classification");

        jLabel_priority.setText("Priority");

        jLabel_dtstart.setText("From");

        jLabel_dtstartError.setForeground(new java.awt.Color(153, 153, 153));
        jLabel_dtstartError.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);

        jLabel_dtend.setText("To");

        jLabel_dtendError.setForeground(new java.awt.Color(153, 153, 153));
        jLabel_dtendError.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);

        jLabel_location.setText("Location");

        jLabel_locationError.setForeground(new java.awt.Color(153, 153, 153));
        jLabel_locationError.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);

        jLabel_resources.setText("Resources");

        jLabel_resourcesError.setForeground(new java.awt.Color(153, 153, 153));
        jLabel_resourcesError.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);

        jLabel_comments.setText("Comments");

        jLabel_commentsError.setForeground(new java.awt.Color(153, 153, 153));
        jLabel_commentsError.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);

        jLabel_outputError.setForeground(new java.awt.Color(153, 153, 153));
        jLabel_outputError.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);

        jTextField_name.setNextFocusableComponent(jComboBox_classification);
        jTextField_name.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField_nameActionPerformed(evt);
            }
        });

        jComboBox_classification.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "PUBLIC", "protected", "CONFIDENTIAL" }));
        jComboBox_classification.setNextFocusableComponent(jComboBox_priority);
        jComboBox_classification.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox_classificationActionPerformed(evt);
            }
        });

        jComboBox_priority.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }));
        jComboBox_priority.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox_priorityActionPerformed(evt);
            }
        });

        dateChooserCombo_dtstartDate.setCurrentView(new datechooser.view.appearance.AppearancesList("Light",
            new datechooser.view.appearance.ViewAppearance("custom",
                new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                    new java.awt.Color(0, 0, 0),
                    new java.awt.Color(0, 0, 255),
                    false,
                    true,
                    new datechooser.view.appearance.swing.ButtonPainter()),
                new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                    new java.awt.Color(0, 0, 0),
                    new java.awt.Color(0, 0, 255),
                    true,
                    true,
                    new datechooser.view.appearance.swing.ButtonPainter()),
                new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                    new java.awt.Color(0, 0, 255),
                    new java.awt.Color(0, 0, 255),
                    false,
                    true,
                    new datechooser.view.appearance.swing.ButtonPainter()),
                new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                    new java.awt.Color(128, 128, 128),
                    new java.awt.Color(0, 0, 255),
                    false,
                    true,
                    new datechooser.view.appearance.swing.LabelPainter()),
                new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                    new java.awt.Color(0, 0, 0),
                    new java.awt.Color(0, 0, 255),
                    false,
                    true,
                    new datechooser.view.appearance.swing.LabelPainter()),
                new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                    new java.awt.Color(0, 0, 0),
                    new java.awt.Color(255, 0, 0),
                    false,
                    false,
                    new datechooser.view.appearance.swing.ButtonPainter()),
                (datechooser.view.BackRenderer)null,
                false,
                true)));
    dateChooserCombo_dtstartDate.setNothingAllowed(false);
    dateChooserCombo_dtstartDate.setNavigateFont(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13));
    dateChooserCombo_dtstartDate.setBehavior(datechooser.model.multiple.MultyModelBehavior.SELECT_SINGLE);

    dateChooserCombo_dtendDate.setCurrentView(new datechooser.view.appearance.AppearancesList("Light",
        new datechooser.view.appearance.ViewAppearance("custom",
            new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                new java.awt.Color(0, 0, 0),
                new java.awt.Color(0, 0, 255),
                false,
                true,
                new datechooser.view.appearance.swing.ButtonPainter()),
            new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                new java.awt.Color(0, 0, 0),
                new java.awt.Color(0, 0, 255),
                true,
                true,
                new datechooser.view.appearance.swing.ButtonPainter()),
            new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                new java.awt.Color(0, 0, 255),
                new java.awt.Color(0, 0, 255),
                false,
                true,
                new datechooser.view.appearance.swing.ButtonPainter()),
            new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                new java.awt.Color(128, 128, 128),
                new java.awt.Color(0, 0, 255),
                false,
                true,
                new datechooser.view.appearance.swing.LabelPainter()),
            new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                new java.awt.Color(0, 0, 0),
                new java.awt.Color(0, 0, 255),
                false,
                true,
                new datechooser.view.appearance.swing.LabelPainter()),
            new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13),
                new java.awt.Color(0, 0, 0),
                new java.awt.Color(255, 0, 0),
                false,
                false,
                new datechooser.view.appearance.swing.ButtonPainter()),
            (datechooser.view.BackRenderer)null,
            false,
            true)));
dateChooserCombo_dtendDate.setNothingAllowed(false);
dateChooserCombo_dtendDate.setNavigateFont(new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13));
dateChooserCombo_dtendDate.setBehavior(datechooser.model.multiple.MultyModelBehavior.SELECT_SINGLE);

jSpinner_dtstartHours.setModel(new javax.swing.SpinnerListModel(new String[] {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}));

jSpinner_dtstartMinutes.setModel(new javax.swing.SpinnerListModel(new String[] {"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"}));

jComboBox_dtstartAMPM.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "am", "pm" }));
jComboBox_dtstartAMPM.setNextFocusableComponent(jSpinner_dtendHours);

jSpinner_dtendHours.setModel(new javax.swing.SpinnerListModel(new String[] {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}));
jSpinner_dtendHours.setNextFocusableComponent(jSpinner_dtendMinutes);

jSpinner_dtendMinutes.setModel(new javax.swing.SpinnerListModel(new String[] {"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"}));
jSpinner_dtendMinutes.setNextFocusableComponent(jComboBox_dtendAMPM);

jComboBox_dtendAMPM.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "am", "pm" }));
jComboBox_dtendAMPM.setNextFocusableComponent(jTextField_location);

jTextField_location.setNextFocusableComponent(jTextField_resources);
jTextField_location.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
        jTextField_locationActionPerformed(evt);
    }
    });

    jTextField_resources.setNextFocusableComponent(jTextArea_comments);
    jTextField_resources.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jTextField_resourcesActionPerformed(evt);
        }
    });

    jTextArea_comments.setColumns(20);
    jTextArea_comments.setRows(5);
    jTextArea_comments.setNextFocusableComponent(jButton_generate);
    jScrollPane.setViewportView(jTextArea_comments);

    jButton_reset.setText("Reset");
    jButton_reset.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton_resetActionPerformed(evt);
        }
    });

    jButton_generate.setText("Generate");
    jButton_generate.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton_generateActionPerformed(evt);
        }
    });

    jTextArea_output.setEditable(false);
    jTextArea_output.setColumns(20);
    jTextArea_output.setRows(5);
    jScrollPane_output.setViewportView(jTextArea_output);

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
        .add(layout.createSequentialGroup()
            .add(18, 18, 18)
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(jLabel_comments)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jLabel_commentsError, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(jLabel_resources)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jLabel_resourcesError, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField_resources, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 308, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField_location, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 308, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(layout.createSequentialGroup()
                            .add(jButton_reset, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(jButton_generate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 308, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField_name, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 308, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(jLabel_location)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jLabel_locationError, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(dateChooserCombo_dtendDate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 115, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jSpinner_dtendHours, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jSpinner_dtendMinutes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jComboBox_dtendAMPM, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 74, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(jLabel_dtstart)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jLabel_dtstartError, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(dateChooserCombo_dtstartDate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 115, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jSpinner_dtstartHours, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jSpinner_dtstartMinutes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jComboBox_dtstartAMPM, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 74, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(jLabel_dtend)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jLabel_dtendError, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 285, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(jComboBox_classification, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 151, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(jLabel_classification))
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                                .add(jLabel_priority)
                                .add(jComboBox_priority, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 151, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                    .add(0, 0, Short.MAX_VALUE)
                    .add(jScrollPane_output, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 316, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                    .add(0, 0, Short.MAX_VALUE)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(Title)
                        .add(layout.createSequentialGroup()
                            .add(jLabel_name)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jLabel_nameError, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 266, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(24, 24, 24)
                            .add(jLabel_outputError, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 312, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))))
            .add(14, 14, 14))
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
        .add(layout.createSequentialGroup()
            .addContainerGap()
            .add(Title)
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                .add(jLabel_nameError, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jLabel_name, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jLabel_outputError, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .add(jTextField_name, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jLabel_priority)
                        .add(jLabel_classification))
                    .add(6, 6, 6)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jComboBox_classification, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jComboBox_priority, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(jLabel_dtstart)
                        .add(jLabel_dtstartError, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                        .add(dateChooserCombo_dtstartDate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jSpinner_dtstartHours, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jSpinner_dtstartMinutes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jComboBox_dtstartAMPM, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                        .add(jLabel_dtend)
                        .add(jLabel_dtendError, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(dateChooserCombo_dtendDate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jSpinner_dtendHours, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jSpinner_dtendMinutes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(org.jdesktop.layout.GroupLayout.TRAILING, jComboBox_dtendAMPM, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                        .add(jLabel_location, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(jLabel_locationError, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jTextField_location, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                        .add(jLabel_resources, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(jLabel_resourcesError, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jTextField_resources, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                        .add(jLabel_comments, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(jLabel_commentsError, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(jScrollPane_output))
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                .add(jButton_generate)
                .add(jButton_reset))
            .addContainerGap())
    );

    pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * ActionEvent handler for "Generate" button
     *
     * @param ActionEvent env
     * @return void
     * @abstract when generate button is clicked grab and sanitize input
     */
    public void jButton_generateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_generateActionPerformed

        boolean error = false;

        /*reset error & output field*/
        jLabel_nameError.setText("");
        jLabel_dtstartError.setText("");
        jLabel_dtendError.setText("");
        jLabel_locationError.setText("");
        jLabel_resourcesError.setText("");
        jLabel_commentsError.setText("");
        jLabel_outputError.setText("");
        jTextArea_output.setText("");

        error = grabInput();

        if (!error) {
            error = sanitizeInput();
        }
        if (!error) {
            error = generateOutput();
        }
        if (!error) {
            jLabel_outputError.setText("File generated - myevent.ics");
        }
    }//GEN-LAST:event_jButton_generateActionPerformed

    /**
     * GrabInput
     *
     * @param none
     * @return boolean, true if error, false otherwise
     * @abstract this method grabs input from the user
     */
    public boolean grabInput() {

        boolean error = false;

        try {

            /*Grab name*/
            this.name = jTextField_name.getText().trim();

            /*Grab classification*/
            this.classification = jComboBox_classification.getSelectedItem().toString().trim();

            /*Grab priority*/
            this.priority = jComboBox_priority.getSelectedItem().toString().trim();

            /*Grab start*/
            this.dtstart_cal = this.dateChooserCombo_dtstartDate.getCurrent();
            this.dtstart_year = Integer.toString(dtstart_cal.get(Calendar.YEAR));
            this.dtstart_month = Integer.toString(dtstart_cal.get(Calendar.MONTH) + 1);
            this.dtstart_day = Integer.toString(dtstart_cal.get(Calendar.DAY_OF_MONTH));
            this.dtstart_hours = jSpinner_dtstartHours.getValue().toString();
            this.dtstart_minutes = jSpinner_dtstartMinutes.getValue().toString();
            this.dtstart_AMPM = jComboBox_dtstartAMPM.getSelectedItem().toString();
            this.dtstart = "";

            /*Grab end*/
            this.dtend_cal = this.dateChooserCombo_dtendDate.getCurrent();
            this.dtend_year = Integer.toString(dtend_cal.get(Calendar.YEAR));
            this.dtend_month = Integer.toString(dtend_cal.get(Calendar.MONTH) + 1);
            this.dtend_day = Integer.toString(dtend_cal.get(Calendar.DAY_OF_MONTH));
            this.dtend_hours = jSpinner_dtendHours.getValue().toString();
            this.dtend_minutes = jSpinner_dtendMinutes.getValue().toString();
            this.dtend_AMPM = jComboBox_dtendAMPM.getSelectedItem().toString();
            this.dtend = "";

            /*Grab location*/
            this.location = jTextField_location.getText().trim();

            /*Grab resources*/
            this.resources = jTextField_resources.getText().trim();

            /*Grab comments*/
            this.comments = jTextArea_comments.getText().trim();

        } catch (Exception e) {
            error = true;
        }
        return error;
    }

    /**
     * sanitizeInput
     *
     * @param none
     * @return boolean, true if error, false otherwise
     * @abstract MUST USE AFTER grabInput. This method sanitizes user input.
     */
    public boolean sanitizeInput() {

        boolean error = false;

        /*BEGIN - Sanitize name*/

        /*Must provide a name*/
        if (this.name.isEmpty()) {
            jLabel_nameError.setText("You must provide a name");
            error = true;
        } else {
            /*Check for unsafe characters*/
            if (!this.name.matches("^[' 'a-zA-Z]+$")) {
                jLabel_nameError.setText("Invalid name - Letters only");
                error = true;
            }
            /*Check if too long*/
            if (this.name.length() > 30) {
                jLabel_nameError.setText("Invalid name - Limit 30 characters");
                error = true;
            }
        }
        /*END - Sanitize name*/


        /* BEGIN - Sanitize Date & Time*/

        /* Format date to absolute notation e.g 1/1/11 -> 01/01/2011*/
        if (this.dtstart_month.length() == 1) {
            this.dtstart_month = "0".concat(this.dtstart_month);
        }
        if (this.dtstart_day.length() == 1) {
            this.dtstart_day = "0".concat(this.dtstart_day);
        }
        if (this.dtend_month.length() == 1) {
            this.dtend_month = "0".concat(this.dtend_month);
        }
        if (this.dtend_day.length() == 1) {
            this.dtend_day = "0".concat(this.dtend_day);
        }
        /*Format time to 24 hour notation e.g 11:00pm -> 23:00*/
        if (this.dtstart_hours.equals("12")) {
            this.dtstart_hours = "00";
        }
        if (this.dtstart_AMPM.equalsIgnoreCase("PM")) {
            this.dtstart_hours = Integer.toString(Integer.parseInt(this.dtstart_hours) + 12);
        }
        if (this.dtend_hours.equals("12")) {
            this.dtend_hours = "00";
        }
        if (this.dtend_AMPM.equalsIgnoreCase("PM")) {
            this.dtend_hours = Integer.toString(Integer.parseInt(this.dtend_hours) + 12);
        }
        /*Format time to absolute notation e.g 100 -> 0100*/
        if (this.dtstart_hours.length() == 1) {
            this.dtstart_hours = "0".concat(this.dtstart_hours);
        }
        if (this.dtend_hours.length() == 1) {
            this.dtend_hours = "0".concat(this.dtend_hours);
        }
        /*Check if start time and end time are valid*/
        double starttimevalue = Double.parseDouble(this.dtstart_year + this.dtstart_month + this.dtstart_day + this.dtstart_hours + this.dtstart_minutes);
        double endtimevalue = Double.parseDouble(this.dtend_year + this.dtend_month + this.dtend_day + this.dtend_hours + this.dtend_minutes);
        if (starttimevalue > endtimevalue) {
            jLabel_dtstartError.setText("Must occur before");
            jLabel_dtendError.setText("Must occur after");
            error = true;
        } else {
            this.dtstart =
                    ("TZID="
                    + this.dtstart_cal.getTimeZone().getID()
                    + ":"
                    + this.dtstart_year
                    + this.dtstart_month
                    + this.dtstart_day
                    + "T"
                    + this.dtstart_hours
                    + this.dtstart_minutes
                    + "00");
            this.dtend =
                    ("TZID="
                    + this.dtend_cal.getTimeZone().getID()
                    + ":"
                    + this.dtend_year
                    + this.dtend_month
                    + this.dtend_day
                    + "T"
                    + this.dtend_hours
                    + this.dtend_minutes
                    + "00");
        }
        /*END - Sanitize Date & Time*/

        /*BEGIN - Sanitize Location*/
        if (!this.location.isEmpty()) {
            /*Check for unsafe characters*/
            if (!this.location.matches("^[' '',''.''\''0-9a-zA-Z]+$")) {
                jLabel_locationError.setText("Invalid location - Alphanumeric only");
                error = true;
            } else {
                /*Replace commas*/
                this.location = this.location.replace(",", "\\,");
            }
            /*Check if too long*/
            if (this.location.length() > 30) {
                jLabel_locationError.setText("Invalid location - Limit 30 characters");
                error = true;
            }
        }
        /*END - Sanitize Location*/


        /*BEGIN - Sanitize Resources*/
        if (!this.resources.isEmpty()) {
            /*Check for unsafe characters*/
            if (!this.resources.matches("^[' '',''.''\''0-9a-zA-Z]+$")) {
                jLabel_resourcesError.setText("Invalid resources - Alphanumeric only");
                error = true;
            } else {
                /*Replace commas*/
                this.resources = this.resources.replace(",", "\\,");
            }
            /*Check if too long*/
            if (this.resources.length() > 30) {
                jLabel_resourcesError.setText("Invalid resources - Limit 30 characters");
                error = true;
            }
        }
        /*END - Sanitize Resources*/

        /*BEGIN - Sanitize Comments*/
        if (!this.comments.isEmpty()) {
            /*Check for unsafe characters*/
            if (!this.comments.matches("^[' '','.''\''\n'0-9a-zA-Z]+$")) {
                jLabel_commentsError.setText("Invalid comment - Alphanumeric only");
                error = true;
            } else {
                /*Replace commas & newlines*/
                this.comments = this.comments.replace(",", "\\,");
                this.comments = this.comments.replace("\n", "\\n");
            }
            //Check if too long
            if (this.comments.length() > 250) {
                jLabel_commentsError.setText("Invalid comment - Limit 250 characters");
                error = true;
            }
        }
        /*END - Sanitize Comments*/

        return error;
    }

    /**
     * generateOutput
     *
     * @param none
     * @return boolean, true if error, false otherwise
     * @abstract MUST USE AFTER grabInput & sanitizeInput. This method generates
     * a .ics file based on sanitized user input.
     */
    public boolean generateOutput() {

        boolean error = false;

        /*Print confirmation output*/
        jTextArea_output.append("BEGIN:VCALENDAR\n");
        jTextArea_output.append("VERSION:2.0\n");
        jTextArea_output.append("BEGIN:VEVENT\n");
        jTextArea_output.append("CLASS:" + this.classification + "\n");
        jTextArea_output.append("PRIORITY:" + this.priority + "\n");
        jTextArea_output.append("DTSTART;" + this.dtstart + "\n");
        jTextArea_output.append("DTEND;" + this.dtend + "\n");
        jTextArea_output.append("SUMMARY:" + this.name + "\n");
        if (!this.location.isEmpty()) {
            jTextArea_output.append("LOCATION:" + this.location + "\n");
        }
        if (!this.resources.isEmpty()) {
            jTextArea_output.append("RESOURCES:" + this.resources + "\n");
        }
        if (!this.comments.isEmpty()) {
            jTextArea_output.append("COMMENTS:" + this.comments + "\n");
            //jTextArea_output.append("DESCRIPTION:" + this.comments + "\n");//Adds description as comments
        }
        jTextArea_output.append("END:VEVENT\n");
        jTextArea_output.append("END:VCALENDAR\n");

        /*Generate .ics file*/
        try {
            FileWriter fstream = new FileWriter("myevent.ics");
            BufferedWriter out = new BufferedWriter(fstream);
            out.write("BEGIN:VCALENDAR\n");
            out.write("VERSION:2.0\n");
            out.write("BEGIN:VEVENT\n");
            out.write("CLASS:" + this.classification + "\n");
            out.write("PRIORITY:" + this.priority + "\n");
            out.write("DTSTART;" + this.dtstart + "\n");
            out.write("DTEND;" + this.dtend + "\n");
            out.write("SUMMARY:" + this.name + "\n");
            if (!this.location.isEmpty()) {
                out.write("LOCATION:" + this.location + "\n");
            }
            if (!this.resources.isEmpty()) {
                out.write("RESOURCES:" + this.resources + "\n");
            }
            if (!this.comments.isEmpty()) {
                out.write("COMMENTS:" + this.comments + "\n");
                out.write("DESCRIPTION:" + this.comments + "\n");//replicates comment as description, to be read by calenders
            }
            out.write("END:VEVENT\n");
            out.write("END:VCALENDAR\n");
            out.close();
        } catch (Exception e) {
            jLabel_outputError.setText("Error - Could not generate file");
            error = true;
        }

        return error;
    }

    /**
     * ActionEvent handler for "Reset" button
     *
     * @param ActionEvent env
     * @return void
     * @abstract when reset button is clicked, clean ui
     */
    protected void jButton_resetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_resetActionPerformed

        /*reset error & output fields*/
        jLabel_nameError.setText("");
        jLabel_dtstartError.setText("");
        jLabel_dtendError.setText("");
        jLabel_locationError.setText("");
        jLabel_resourcesError.setText("");
        jLabel_commentsError.setText("");
        jLabel_outputError.setText("");
        jTextArea_output.setText("");

        /*clear input fields */
        jTextField_name.setText("");
        jTextField_resources.setText("");
        jTextField_location.setText("");
        jTextArea_comments.setText("");

        /*clear data */
        this.name = "";
        this.classification = "";
        this.priority = "";
        this.dtstart = "";
        this.dtstart_year = "";
        this.dtstart_month = "";
        this.dtstart_day = "";
        this.dtstart_hours = "";
        this.dtstart_minutes = "";
        this.dtstart_AMPM = "";
        this.dtend = "";
        this.dtend_year = "";
        this.dtend_month = "";
        this.dtend_day = "";
        this.dtend_hours = "";
        this.dtend_minutes = "";
        this.dtend_AMPM = "";
        this.location = "";
        this.resources = "";
        this.comments = "";
    }//GEN-LAST:event_jButton_resetActionPerformed

    protected void jComboBox_classificationActionPerformed(java.awt.event.ActionEvent evt) {
    }

    protected void jTextField_locationActionPerformed(java.awt.event.ActionEvent evt) {
    }

    protected void jTextField_nameActionPerformed(java.awt.event.ActionEvent evt) {
    }

    protected void jTextField_resourcesActionPerformed(java.awt.event.ActionEvent evt) {
    }

    protected void jComboBox_priorityActionPerformed(java.awt.event.ActionEvent evt) {
    }

    /**
     * Main
     *
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /**
         * Set the Nimbus look and feel. If Nimbus (introduced in Java SE 6) is
         * not available, stay with the default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(BigBend_icsEventGenerator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(BigBend_icsEventGenerator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(BigBend_icsEventGenerator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(BigBend_icsEventGenerator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new BigBend_icsEventGenerator().setVisible(true);
            }
        });
    }
}
